@import "../mixin.scss";

.message-fade-enter,.message-fade-leave-to{
    opacity: 0;
    transform: translateY(-100px);
}

@include namespace(message) {
    min-width: 380px;
    box-sizing: border-box;
    border-width: 1px;
    border-style: solid;
    border-color: #EBEEF5;
    position: fixed;
    background-color: #edf2fc;
    transition: opacity .3s, transform .4s, top .4s;
    padding: 15px 15px 15px 20px;
    display: flex;
    align-items: center;
    border-radius: 4px;

    p{
        margin: 0;
        padding: 0;
    }

    &__icon {
        margin-right: 10px;
    }

    @include when(info) {
        color: #909399;

        .el-message__content {
            color: #909399;
        }
    }

    @include when(success) {
        color: #67c23a;
        background-color: #F0F9EB;
        .el-message__content {
            color: #67c23a;
        }
    }

    @include when(warning) {
        color: #e6a23a;
        background-color: #FDF6EC;
        .el-message__content {
            color: #e6a23a;
        }
    }

    @include when(error) {
        color: #F56C6C;
        background-color: #FEF0F0;

        .el-message__content {
            color: #F56C6C;
        }
    }

    @include when(closable) {
        .el-message__content {
            padding-right: 16px;
        }
    }

    &__content {
        padding: 0;
        font-size: 14px;
        line-height: 1;
    }

    &__closeBtn {
        position: absolute;
        top: 50%;
        right: 15px;
        transform: translateY(-50%);
        cursor: pointer;
        color: #C0C4CC;
        font-size: 16px;
    }
}